Using the function hex() you can convert numbers into a hexadecimal format:
In [4]:
hex(246)
Out[4]:
In [5]:
hex(512)
Out[5]:
Using the function bin() you can convert numbers into their binary format.
In [19]:
bin(1234)
Out[19]:
In [18]:
bin(128)
Out[18]:
In [16]:
bin(512)
Out[16]:
In [8]:
pow(2,4)
Out[8]:
In [9]:
abs(-3)
Out[9]:
In [10]:
abs(3)
Out[10]:
In [11]:
round(3)
Out[11]:
In [13]:
round(3.1415926535,2)
Out[13]:
Python has a built-in math library that is also useful to play around with in case you are ever in need of some mathematical operations. Explore the documentation here!